﻿@using System.Web;
@using Web_Login.Models;
@using ModeloNegocio;
@*@model IEnumerable<TipoDeProducto>*@
@model ModeloGeneral
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/bootstrap/css/bootstrap.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Content/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/bootstrap/js/bootstrap.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/bootstrap/css/bootstrap-responsive.css")" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            padding-top: 60px;
            padding-bottom: 40px;
        }
        .sidebar-nav
        {
            padding: 9px 0;
        }
        body
        {
            background-image: url(http://manganimemty.files.wordpress.com/2009/02/dragon_ball_z2.jpg);
        }
    </style>
</head>
<body>
    <div id="navBar">
        @if (HttpContext.Current.User.Identity.IsAuthenticated)
        {

            Usuario usuarioValido = new Usuario();
            usuarioValido = CapaDeNegocioUsuario.Usuarios.Single(usuario => usuario.UserName == HttpContext.Current.User.Identity.Name);

            Model.Usuario = usuarioValido;

            MvcHtmlString htmlString;

            htmlString = Html.Partial("_NavUsuario", Model);

            Response.Write(htmlString);
        }
        else
        {
            MvcHtmlString htmlString;

            htmlString = Html.Partial("_NavRegistrarLogin", Model);

            Response.Write(htmlString);
        }
    </div>
    <div id="sideBar">
        @Html.Partial("_SideBarTipoDeProductos", Model)
    </div>
    <div class="row-fluid">
        <div class="span9 offset3">
            <div id="contenido">
            </div>
        </div>
    </div>
</body>
</html>
